package nk;

import java.util.Scanner;

/**
 * 题目描述
 * <p>
 * 描述：
 * <p>
 * 输入一个整数，将这个整数以字符串的形式逆序输出
 * <p>
 * 程序不考虑负数的情况，若数字含有0，则逆序形式也含有0，如输入为100，则输出为001
 */
public class NumtoStr {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int num = sc.nextInt();
            System.out.println(numToStr(num));
        }
    }

    private static String numToStr(int num) {

        String str = "" + num;
        char[] chars = str.toCharArray();
        int i = 0,
                j = chars.length - 1;
        while (i < j) {
            char t = chars[i];
            chars[i] = chars[j];
            chars[j] = t;
            i++;
            j--;
        }
        str = new String(chars);
        return str;
    }
}
